home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Tools - Objects / MacApp / Unsupported Samples / CRC Cards / Source / UItem.p < prev    next >
Encoding:
Text File  |  1990-07-11  |  6.9 KB  |  169 lines  |  [TEXT/MPS ]

  1. Unit UItem;
  2.  
  3. INTERFACE
  4.  
  5. USES
  6.     UMacApp,
  7.     ToolUtils,
  8.     Resources,
  9.     Packages,
  10.     UPrinting,
  11.     UTEView,
  12.     UDialog,
  13.     UGridView,
  14.     UCRCCards,
  15.     UTextHandler,
  16.     UCard,
  17.     UDesignDocument,
  18.     UMyViews,
  19.     UMyCommands;
  20.     
  21. TYPE
  22.     TItem = OBJECT(TObject)
  23.         fName: str255;
  24.         fCard: TCard;
  25.         fTextHandler: TTextHandler;
  26.         
  27.         PROCEDURE TItem.IItem(theCard: TCard; theName: str255);
  28.         PROCEDURE TItem.StripIllegalChars(VAR theStr: str255);
  29.         FUNCTION TItem.GetTheName: str255;
  30.         PROCEDURE TItem.SetTheName(theName: str255);
  31.         FUNCTION TItem.GetTheItem: str255;
  32.         FUNCTION TItem.GetTheCard: TCard;
  33.         FUNCTION TItem.GetTextHandler: TTextHandler;
  34.         PROCEDURE TItem.SetTextHandler(theTextHandler: TTextHandler);
  35.         FUNCTION TItem.ReturnBytes: LONGINT;
  36.         PROCEDURE TItem.ReadTheItem(aRefNum: INTEGER; theCard: TCard);
  37.         PROCEDURE TItem.WriteTheItem(aRefNum: INTEGER);
  38.         PROCEDURE TItem.WriteDeclaration(theTEView: TMyTEView);
  39.         PROCEDURE TItem.CheckForPrefix;
  40.         PROCEDURE TItem.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr; 
  41.                 fieldType: INTEGER)); OVERRIDE;
  42.     END;
  43.     
  44.     TFieldItem = OBJECT(TItem)
  45.         fItemType: str255;
  46.         fGetAccessor: TGetAccessorItem;
  47.         fSetAccessor: TSetAccessorItem;
  48.         fFieldsTypeConst: str255;
  49.         fPassByAddress: BOOLEAN;
  50.         
  51.         PROCEDURE TFieldItem.IFieldItem(theCard: TCard; theName, theTypeStr: str255);
  52.         FUNCTION TFieldItem.GetItemType: str255;
  53.         PROCEDURE TFieldItem.SetItemType(theItemType: str255);
  54.         FUNCTION TFieldItem.GetTheItem: str255; OVERRIDE;
  55.         FUNCTION TFieldItem.GetTheFieldStr: str255;
  56.         PROCEDURE TFieldItem.SetPassByAddress;
  57.         FUNCTION TFieldItem.GetPassByAddress: BOOLEAN;
  58.         FUNCTION TFieldItem.GetTheFieldsTypeConst: str255;
  59.         PROCEDURE TFieldItem.SetTheFieldsTypeConst;
  60.         PROCEDURE TFieldItem.GetAccessors(VAR theGetter: TGetAccessorItem;
  61.                                                                             VAR theSetter: TSetAccessorItem);
  62.         PROCEDURE TFieldItem.SetGetAccessor(theGetter: TGetAccessorItem);
  63.         PROCEDURE TFieldItem.SetSetAccessor(theSetter: TSetAccessorItem);
  64.         PROCEDURE TFieldItem.MakeGetNIL;
  65.         PROCEDURE TFieldItem.MakeSetNIL;
  66.         PROCEDURE TFieldItem.CheckForPrefix; OVERRIDE;
  67.         FUNCTION TFieldItem.GetTheDeclaration: str255;
  68.         FUNCTION TFieldItem.GetTheImplDeclaration: str255;
  69.         PROCEDURE TFieldItem.WriteDeclaration(theTEView: TMyTEView); OVERRIDE;
  70.         FUNCTION TFieldItem.ReturnBytes: LONGINT; OVERRIDE;
  71.         PROCEDURE TFieldItem.ReadTheItem(aRefNum: INTEGER; theCard: TCard); OVERRIDE;
  72.         PROCEDURE TFieldItem.WriteTheItem(aRefNum: INTEGER); OVERRIDE;
  73.         PROCEDURE TFieldItem.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr; 
  74.                 fieldType: INTEGER)); OVERRIDE;
  75.     END;
  76.     
  77.     TMethodItem = OBJECT(TItem)
  78.         fOVERRIDE: boolean;
  79.     
  80.         FUNCTION TMethodItem.GetOVERRIDE: boolean;
  81.         PROCEDURE TMethodItem.SetOVERRIDE(overrideIt: boolean);
  82.         PROCEDURE TMethodItem.IMethodItem(theCard: TCard; theName: str255; 
  83.                                                                             makeItOVERRIDE: boolean);
  84.         PROCEDURE TMethodItem.CheckForPrefix; OVERRIDE;
  85.         FUNCTION TMethodItem.ReturnBytes: LONGINT; OVERRIDE;
  86.         FUNCTION TMethodItem.GetNumRealMethods: integer;
  87.         PROCEDURE TMethodItem.ReadTheItem(aRefNum: INTEGER; theCard: TCard); OVERRIDE;
  88.         PROCEDURE TMethodItem.WriteTheItem(aRefNum: INTEGER); OVERRIDE;
  89.         PROCEDURE TMethodItem.WriteDeclaration(theTEView: TMyTEView); OVERRIDE;
  90.         FUNCTION TMethodItem.GetTheDeclaration: str255;
  91.         FUNCTION TMethodItem.GetTheImplDeclaration: str255;
  92.         PROCEDURE TMethodItem.WriteInlineProcedures(theTEView: TMyTEView);
  93.         PROCEDURE TMethodItem.WriteImplementation(theTEView: TMyTEView);
  94.         FUNCTION TMethodItem.GetTheCodeLine: str255;
  95.         PROCEDURE TMethodItem.StripIllegalChars(VAR theStr: str255); OVERRIDE;
  96.         PROCEDURE TMethodItem.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr; 
  97.                 fieldType: INTEGER)); OVERRIDE;
  98.     END;
  99.     
  100.     TAccessorItem = OBJECT(TMethodItem)
  101.         fFunction: boolean;
  102.         fFieldAccessed: TFieldItem;
  103.         
  104.         PROCEDURE TAccessorItem.IAccessorItem(theCard: TCard; 
  105.                                         theName: str255; ourField: TFieldItem);
  106.         PROCEDURE TAccessorItem.SetFieldReference(theField: TFieldItem);
  107.         FUNCTION TAccessorItem.GetFieldAccessed: TFieldItem;
  108.         PROCEDURE TAccessorItem.SetFunction(makeItAFunction: boolean);
  109.         FUNCTION TAccessorItem.GetTheItem: str255; OVERRIDE;
  110.         FUNCTION TAccessorItem.GetTheDeclaration: str255; OVERRIDE;
  111.         FUNCTION TAccessorItem.GetTheImplDeclaration: str255; OVERRIDE;
  112.         FUNCTION TAccessorItem.GetParameter: str255;
  113.         PROCEDURE TAccessorItem.WriteImplementation(theTEView: TMyTEView); OVERRIDE;
  114.         FUNCTION TAccessorItem.ReturnBytes: LONGINT; OVERRIDE;
  115.         FUNCTION TAccessorItem.GetNumRealMethods: integer; OVERRIDE;
  116.         PROCEDURE TAccessorItem.ReadTheItem(aRefNum: INTEGER; theCard: TCard); OVERRIDE;
  117.         PROCEDURE TAccessorItem.WriteTheItem(aRefNum: INTEGER); OVERRIDE;
  118.         PROCEDURE TAccessorItem.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr; 
  119.                 fieldType: INTEGER)); OVERRIDE;
  120.     END;
  121.     
  122.     TGetAccessorItem = OBJECT(TAccessorItem)
  123.         FUNCTION TGetAccessorItem.GetTheCodeLine: str255; OVERRIDE;
  124.         FUNCTION TGetAccessorItem.GetTheItem: str255; OVERRIDE;
  125.         FUNCTION TGetAccessorItem.GetTheDeclaration: str255; OVERRIDE;
  126.         FUNCTION TGetAccessorItem.GetTheImplDeclaration: str255; OVERRIDE;
  127.         PROCEDURE TGetAccessorItem.WriteInlineProcedures(theTEView: TMyTEView); OVERRIDE;
  128.         PROCEDURE TGetAccessorItem.CheckForPrefix; OVERRIDE;
  129.         PROCEDURE TGetAccessorItem.Free; OVERRIDE;
  130.     END;
  131.     
  132.     TSetAccessorItem = OBJECT(TAccessorItem)
  133.         FUNCTION TSetAccessorItem.GetTheCodeLine: str255; OVERRIDE;
  134.         FUNCTION TSetAccessorItem.GetTheItem: str255; OVERRIDE;
  135.         FUNCTION TSetAccessorItem.GetTheDeclaration: str255; OVERRIDE;
  136.         FUNCTION TSetAccessorItem.GetTheImplDeclaration: str255; OVERRIDE;
  137.         PROCEDURE TSetAccessorItem.WriteInlineProcedures(theTEView: TMyTEView); OVERRIDE;
  138.         PROCEDURE TSetAccessorItem.CheckForPrefix; OVERRIDE;
  139.         PROCEDURE TSetAccessorItem.Free; OVERRIDE;
  140.     END;
  141.     
  142.     TFieldsMethodItem = OBJECT(TMethodItem)
  143.         FUNCTION TFieldsMethodItem.GetTheDeclaration: str255; OVERRIDE;
  144.         FUNCTION TFieldsMethodItem.GetTheImplDeclaration: str255; OVERRIDE;
  145.         PROCEDURE TFieldsMethodItem.WriteImplementation(theTEView: TMyTEView); OVERRIDE;
  146.         FUNCTION TFieldsMethodItem.GetNumRealMethods: integer; OVERRIDE;
  147.         FUNCTION TFieldsMethodItem.ReturnBytes: LONGINT; OVERRIDE;
  148.         PROCEDURE TFieldsMethodItem.ReadTheItem(aRefNum: INTEGER; theCard: TCard); OVERRIDE;
  149.         PROCEDURE TFieldsMethodItem.WriteTheItem(aRefNum: INTEGER); OVERRIDE;
  150.     END;
  151.     
  152.     TCollaboratorItem = OBJECT(TFieldItem)
  153.         PROCEDURE TCollaboratorItem.ICollaboratorItem(theCard: TCard; theName: str255);
  154.         PROCEDURE TCollaboratorItem.CheckForPrefix; OVERRIDE;
  155.         FUNCTION TCollaboratorItem.GetTheItem: str255; OVERRIDE;
  156.         FUNCTION TCollaboratorItem.GetTheFieldStr: str255; OVERRIDE;
  157.         PROCEDURE TCollaboratorItem.SetTheFieldsTypeConst; OVERRIDE;
  158.         FUNCTION TCollaboratorItem.GetTheDeclaration: str255; OVERRIDE;
  159.         FUNCTION TCollaboratorItem.GetTheImplDeclaration: str255; OVERRIDE;
  160.         FUNCTION TCollaboratorItem.ReturnBytes: LONGINT; OVERRIDE;
  161.         PROCEDURE TCollaboratorItem.ReadTheItem(aRefNum: INTEGER; theCard: TCard); OVERRIDE;
  162.         PROCEDURE TCollaboratorItem.WriteTheItem(aRefNum: INTEGER); OVERRIDE;
  163.     END;
  164.     
  165. IMPLEMENTATION
  166.  
  167. {$I UItem.inc1.p}
  168.  
  169. END.